<?php
namespace Superadmins\Model; 
use Think\Model\ViewModel;


	class SchoolAddressModel extends ViewModel
{
	
	public $viewFields = array(    
	 'School'=>array('*','_type'=>'LEFT'), 
	 'SchoolAddress'=>array('_on'=>'School.school_id=SchoolAddress.school_id','province','main'),
	);
	
	public function addAddress()
	{
		$this->create();
		$address_id=$this->add();
		return $address_id;
	}
	public function clear()
	{
		$state=$this->delete(I('get.address_id'));
		return $state;
	}
}